home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 11⁄3⁄89 / 0021-TCellSelectCommand B-Nov89 < prev    next >
Encoding:
Text File  |  1989-11-03  |  1.4 KB  |  49 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  A33          to A34
  2.  
  3. Item    6605201                         2-Nov-89        19:01
  4.  
  5. From:   D2086                           Efficient Field Svc, C Faith,PRT
  6.  
  7. To:     MACAPP.TECH$                    MacApp Technical
  8.         MACAPP.TEST                     MacApp SQA Team
  9.         MACDTS                          Macintosh Developer Tech. Supt.
  10.  
  11. Sub:    TCellSelectCommand Bug
  12.  
  13. One finds the following in TCellSelectCommand.ICellSelectCommand:
  14.  
  15.    BEGIN
  16.    ICommand(0, NIL, itsView, itsView.GetScroller(FALSE));
  17.    fCanUndo := FALSE;
  18.    fCausesChange := FALSE;
  19.    fViewConstrain := FALSE;
  20.  
  21.    fShiftKey := theShiftKey;
  22.    fCmdKey := theCmdKey;
  23.    fGridView := itsView;
  24.    fPrevCell.h := - 1;
  25.  
  26.    fPrevSelection := MakeNewRgn;
  27.    CopyRgn(fGridView.fSelections, fPrevSelection);
  28.    fThisSelection := fGridView.fHLRegion;
  29.    SetEmptyRgn(fThisSelection);
  30.    fDifference := MakeNewRgn;
  31.    END;
  32.  
  33. One finds the following in TCellSelectCommand.Free:
  34.  
  35.    IF fPrevSelection <> NIL THEN
  36.    DisposeRgn(fPrevSelection);
  37.    IF fDifference <> NIL THEN
  38.    DisposeRgn(fDifference);
  39.  
  40. If the first call to MakeNewRgn Fails won't the Free method bomb when it
  41. disposes of fDifference since fDifference was never initially set to NIL.
  42.  
  43. One more thing, Can't the call to CopyRgn fail also?  Should there not be a
  44. failure handler for ICellSelectCommand that calls Free?
  45.  
  46. - Curtis
  47.  
  48.  
  49.